package com.unisal.java;

import java.util.Hashtable;
import java.util.Iterator;

public class MenuCafe implements Menu{
	Hashtable<String, ItemDoMenu> menuItems = new Hashtable<>();
	  
	public MenuCafe() {
		addItem("Hamburger vegetariano e batatas fritas",
			"Veggie burger on a whole wheat bun, lettuce, tomato, and fries",
			true, 3.99);
		addItem("Sopa do dia",
			"Uma tijela de sopa do dia com salada",
			false, 3.69);
		addItem("Burrito",
			"Um Burrito grande, with whole pinto beans, salsa, guacamole",
			true, 4.29);
	}
 
	public void addItem(String name, String description, 
	                     boolean vegetarian, double price) 
	{
		ItemDoMenu menuItem = new ItemDoMenu(name, description, vegetarian, price);
		menuItems.put(menuItem.getNome(), menuItem);
	}
 
//	public Hashtable<String, ItemDoMenu> getItems() {
//		return menuItems;
//	}
  
	@Override
	public Iterator<ItemDoMenu> criaIterator() {
		return menuItems.values().iterator();
	}
}
